package com.gin.kotlin.no_gay_alliance.database.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.gin.kotlin.no_gay_alliance.database.entity.BanUser

@Dao
interface BanUserDao {
    @Query("select * from BanUser")
    fun list(): List<BanUser>?

    @Query("select * from BanUser  where userId=:userId")
    fun get(userId: Long): BanUser?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun add(users: List<BanUser>)

    @Query("delete from BanUser where userId=:userId")
    fun del(userId: Long)

    @Query("delete from BanUser")
    fun clear()
}